package com.nuc.object;

/**
 * Time    : 2023/3/30 14:41
 * Author  : 王摇摆
 * FileName: Demo1.java
 * Software: IntelliJ IDEA 2020.2.2
 * Blog    ：https://blog.csdn.net/weixin_44943389?type=blog
 */
class Person {
    public String name;

    public Person(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return super.toString();
    }

    @Override
    public boolean equals(Object obj) {
        return super.equals(obj);
    }
}

class Student {

}

public class Demo1 {
    public static void main(String[] args) {
        Person person1 = new Person("wgw");
        Person person2 = new Person("wgw");

        System.out.println(person1.toString());
        System.out.println(person2.toString());

        System.out.println(person1.equals(person2));
    }
}